home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Files / Volumes / VolumeLoop.cp < prev    next >
Text File  |  2000-06-23  |  390b  |  29 lines

  1. // VolumeLoop.cp
  2.  
  3. #ifndef VolumeLoop_h
  4. #include "VolumeLoop.h"
  5. #endif
  6. #ifndef NoSuchVolume_h
  7. #include "NoSuchVolume.h"
  8. #endif
  9.  
  10. VolumeLoop::VolumeLoop()
  11.   : index( 1 ),
  12.      unfinished( true )
  13.   {
  14.     GetInfo();
  15.   }
  16.  
  17. void VolumeLoop::operator++()
  18.   {
  19.     Assert( unfinished );
  20.     index++;
  21.     GetInfo();
  22.   }
  23.  
  24. void VolumeLoop::GetInfo()
  25.   {
  26.     Assert( unfinished );
  27.     unfinished = info.TryToGet( index );
  28.   }
  29.